Scripps CO2 Program Primary Mauna Loa CO2 Record
https://scrippsco2.ucsd.edu/data/atmospheric_co2/primary_mlo_co2_record.html
C. D. Keeling, S. C. Piper, R. B. Bacastow, M. Wahlen, T. P. Whorf, M. Heimann, and H. A. Meijer, Exchanges of atmospheric CO2 and 13CO2 with the terrestrial biosphere and oceans from 1978 to 2000. I. Global aspects, SIO Reference Series, No. 01-06, Scripps Institution of Oceanography, San Diego, 88 pages, 2001.
Global Monitoring Laboratory Global Trends in Atmospheric Carbon Dioxide
https://gml.noaa.gov/ccgg/trends/gl_data.html
Lan, X., Tans, P. and K.W. Thoning: Trends in globally-averaged CO2 determined from NOAA Global Monitoring Laboratory measurements. Version 2023-04 https://doi.org/10.15138/9N0H-ZH07
import pandas as pd
import plotly.graph_objs as go
data_1 = "https://scrippsco2.ucsd.edu/assets/data/atmospheric/stations/in_situ_co2/monthly/monthly_in_situ_co2_mlo.csv"
df1 = pd.read_csv(data_1, skiprows=61, nrows=781, usecols=[3,8])
df1.columns = ["Date", "CO2"]
df1.head()
| Date | CO2 | |
|---|---|---|
| 0 | 1958.2027 | 315.71 |
| 1 | 1958.2877 | 317.45 |
| 2 | 1958.3699 | 317.51 |
| 3 | 1958.4548 | 317.26 |
| 4 | 1958.5370 | 315.87 |
data_2 = "https://gml.noaa.gov/webdata/ccgg/trends/co2/co2_mm_gl.csv"
df2 = pd.read_csv(data_2, skiprows=55, usecols=[2,3])
df2.columns = ["Date", "AVG"]
df2.head()
| Date | AVG | |
|---|---|---|
| 0 | 1979.042 | 336.56 |
| 1 | 1979.125 | 337.29 |
| 2 | 1979.208 | 337.88 |
| 3 | 1979.292 | 338.32 |
| 4 | 1979.375 | 338.26 |
fig = go.Figure()
fig.add_trace(go.Scatter(x=df1['Date'], y=df1['CO2'], mode='lines', name='Mauna Loa CO2 Record'))
fig.add_trace(go.Scatter(x=df2['Date'], y=df2['AVG'], mode='lines', name='Globally averaged marine surface'))
fig.update_layout(title='Monthly CO2 Concentration', xaxis_title='Date', yaxis_title='CO2 in ppm')
fig.show()